/**
 * @description 缓存存储
*/

import { StoreSession } from '@daelui/dogjs/dist/components'

class StoreUni extends StoreSession {
  /**
   * @function 获取存储器
   * @return {Object}
  */
  getStorage () {
    return {
      setItem (key, value) {
        return uni.setStorageSync(key, value)
      },
      getItem (key) {
        return uni.getStorageSync(key)
      },
      clear () {
        uni.clearStorage()
      }
    }
  }
}

// 默认实例
const storeUni = new StoreUni

export default storeUni

export {
  StoreUni
}
